home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1994 April / Nautilus CD Magazine Volume 4-4 April 1994 Windows Edition.mdf / setup / nautcd / link / datexj.scr < prev    next >
Text File  |  1993-08-24  |  1KB  |  68 lines

  1. !
  2. !  Copyright (c) 1993
  3. !  by CompuServe Incorporated, Columbus, Ohio
  4. !
  5. !  The information in this software is subject to change without
  6. !  notice and should not be construed as a commitment by CompuServe.
  7. !
  8. !  Datex-J (BTX):
  9. !    Success:  returns %Success
  10. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  11. !
  12. !+V
  13. ! "3.1"
  14. !-V
  15.  
  16. Tries = 5;
  17. Second_Time = %FALSE;
  18. on cancel goto Return_Cancel;
  19. show "Connecting to Datex-J";
  20.  
  21. Wait_DatexJ:
  22.     if Tries = 0 goto DatexJ_Failure;
  23.     Tries = Tries - 1;
  24.     wait
  25.         "^@"        goto Send_Response,
  26.         "^E"        goto Send_Response,
  27.         "kennung"    goto Send_Kennung,
  28.         %mdm_Failure    goto DatexJ_Failure
  29.     until 200;
  30.  
  31.     goto Wait_DatexJ;
  32.  
  33. Send_Response: 
  34.     send "." & %CR;
  35. Send_Kennung:
  36.     wait until 100;
  37.     send "000255975978";
  38.     show "Sending Datex-J User ID number";
  39. Send_CR:
  40.     wait 
  41.         "DM"        goto Send_Pound,
  42.         "Host Name:"    goto Return_Success
  43.     until 300;
  44.  
  45.     if Second_Time = %TRUE goto DatexJ_Failure;
  46.  
  47. Send_Pound:
  48.     wait until 10;
  49.     send %CR;
  50.     wait until 10;
  51.     send %CR;
  52.     wait until 10;
  53.     send %CR;
  54.     Second_Time = %TRUE;
  55.     goto Send_CR;
  56.  
  57. DatexJ_Failure:
  58.     define %FailureMsg = "Datex-J not responding";
  59.     exit %Failure;
  60.  
  61. Return_Cancel:
  62.     exit %Cancel;
  63.  
  64. Return_Success:
  65.     send %CR;
  66.     wait until 10;
  67.     exit %Success;
  68.